package com.esri.core.internal.util;

import java.io.File;
import java.io.FileInputStream;

/* loaded from: classes.dex */
public class LocalGDBUtil {
    private static final int[] a = {83, 81, 76, 105, 116, 101, 32, 102, 111, 114, 109, 97, 116, 32, 51, 0};

    public static native String nativeQueryAggregate(long j, int i, String str);

    public static native String nativeQueryAggregateTableIdx(long j, int i, String str);

    public static native long[] nativeQueryIds(long j, int i, String str);

    public static native long[] nativeQueryIdsTableIdx(long j, int i, String str);

    public static native String nativeRelatedQueryIds(long j, int i, String str);

    public static boolean a(File file) throws Exception {
        if (file == null || !file.exists()) {
            return false;
        }
        FileInputStream fileInputStream = new FileInputStream(file);
        int i = 0;
        while (true) {
            try {
                int[] iArr = a;
                if (i >= iArr.length) {
                    fileInputStream.close();
                    return true;
                } else if (fileInputStream.read() != iArr[i]) {
                    return false;
                } else {
                    i++;
                }
            } finally {
                fileInputStream.close();
            }
        }
    }
}
